import h from "./mySnabbdom/h";
import patch from "./mySnabbdom/patch";


const container = document.getElementById('container');
const btn = document.getElementById("btn");

const myVnode = h("ul", {}, [
  h("li", {key: 'A'}, "A"),
  h("li", {key: 'B'}, "B"),
  h("li", {key: 'C'}, "C"),
  h("li", {key: 'D'}, "D"),
]);

const myVnode1 = h("ul", {}, [
  h("li", {key: 'qq'}, "qq"),
  h("li", {key: 'D'}, "D"),
  h("li", {key: 'A'}, "A"),
  h("li", {key: 'B'}, "B"),
]);
patch(container,myVnode)
btn.onclick = function () {
  patch(myVnode, myVnode1);
};



